home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / dos / freedosentry.c < prev    next >
C/C++ Source or Header  |  1996-09-12  |  1KB  |  70 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: freedosentry.c,v 1.3 1996/08/13 13:52:47 digulla Exp $
  4.     $Log: freedosentry.c,v $
  5.     Revision 1.3  1996/08/13 13:52:47  digulla
  6.     Replaced <dos/dosextens.h> by "dos_intern.h" or added "dos_intern.h"
  7.     Replaced __AROS_LA by __AROS_LHA
  8.  
  9.     Revision 1.2  1996/08/01 17:40:52  digulla
  10.     Added standard header for all files
  11.  
  12.     Desc:
  13.     Lang: english
  14. */
  15. #include <clib/exec_protos.h>
  16. #include "dos_intern.h"
  17.  
  18. /*****************************************************************************
  19.  
  20.     NAME */
  21.     #include <clib/dos_protos.h>
  22.  
  23.     __AROS_LH1(void, FreeDosEntry,
  24.  
  25. /*  SYNOPSIS */
  26.     __AROS_LHA(struct DosList *, dlist, D1),
  27.  
  28. /*  LOCATION */
  29.     struct DosLibrary *, DOSBase, 117, Dos)
  30.  
  31. /*  FUNCTION
  32.     Frees a dos list entry created with MakeDosEntry().
  33.  
  34.     INPUTS
  35.     dlist - pointer to dos list entry. May be NULL.
  36.  
  37.     RESULT
  38.  
  39.     NOTES
  40.  
  41.     EXAMPLE
  42.  
  43.     BUGS
  44.  
  45.     SEE ALSO
  46.  
  47.     INTERNALS
  48.  
  49.     HISTORY
  50.     29-10-95    digulla automatically created from
  51.                 dos_lib.fd and clib/dos_protos.h
  52.  
  53. *****************************************************************************/
  54. {
  55.     __AROS_FUNC_INIT
  56.     __AROS_BASE_EXT_DECL(struct DosLibrary *,DOSBase)
  57.  
  58.     if(dlist!=NULL)
  59.     {
  60.     STRPTR s2;
  61.     s2=dlist->dol_Name;
  62.     while(*s2++)
  63.        ;
  64.     FreeMem(dlist->dol_Name-1,s2-dlist->dol_Name+2);
  65.     FreeMem(dlist,sizeof(struct DosList));
  66.     }
  67.  
  68.     __AROS_FUNC_EXIT
  69. } /* FreeDosEntry */
  70.